package com.yp.service;

import com.yp.model.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.http.HttpRequest;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 12691
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2025-09-01 10:24:44
*/
public interface UserService extends IService<User> {



    /**
     * 注册
     * @param userAccount 用户账号
     * @param userPassword 用户登录密码
     * @param checkPassword 确认密码
     * @param pantCode 星球编号
     * @return id
     */
    long userRegister(String userAccount,String userPassword,String checkPassword,String pantCode);

    /**
     * 登录
     * @param userAccount 用户账号
     * @param userPassword 用户登录密码
     * @param request  向前端提交session
     * @return
     */
    User userLogin(String userAccount, String userPassword, HttpServletRequest request);


    /**
     * 用户脱敏
     * @param orgUser
     * @return
     */
    User getSafetyUser(User orgUser);

    int userLogout(HttpServletRequest request);

    List<User> searchUsersByTags(List<String> tagNameList);
}
